import Vue from 'vue'
import Vuex from 'vuex'
// 持久化插件
import createPersistedState from 'vuex-persistedstate'
// 导入全局模块
import actions from './actions';
import getters from './getters';
import mutations from './mutations';

import operation from './operation/index'
import account from './account/index'
import route from './route/index'
import menu from './menu/index'
import limit from './limit/index'
import role from './role/index'
Vue.use(Vuex)
// 导入模块
export default new Vuex.Store({
  state: {
    side_hidden:false,
  },
  getters,
  mutations,
  actions,
  modules: {
    operation,
    account,
    route,
    menu,
    limit,
    role
  },
  plugins:[
    createPersistedState({
      storage: window.sessionStorage,
    }),
  ]
})
